<template>
  <div class="navbar">
    <van-search
      shape="round"
      v-model="searchValue"
      placeholder="请输入搜索关键词"
    />
  </div>
  <div class="home-container">
    <van-tabs v-model:active="active" color="#1989fa">
      <van-tab to="/" title="系统推荐">
        <router-view v-slot="{ Component }">
          <keep-alive>
            <component :is="Component" v-if="$route.meta.keepAlive" />
          </keep-alive>
          <component :is="Component" v-if="!$route.meta.keepAlive" />
        </router-view>
      </van-tab>
      <van-tab title="标签 2">内容 2</van-tab>
      <van-tab title="标签 3">内容 3</van-tab>
      <van-tab title="标签 4">内容 4</van-tab>
    </van-tabs>
  </div>
</template>

<script>
export default {
  name: 'home',
  data () {
    return {
      searchValue: '',
      active: 0
    }
  },
  methods: {}
}
</script>

<style lang="less"></style>
